//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.baidu.lbsapi.auth.tracesdk;

import android.os.Handler;
import android.os.Looper;

class l extends Thread {
    Handler a = null;
    private Object b = new Object();
    private boolean c = false;

    l() {
    }

    l(String var1) {
        super(var1);
    }

    public void run() {
        Looper.prepare();
        this.a = new Handler();
        if(com.baidu.lbsapi.auth.tracesdk.a.a) {
            com.baidu.lbsapi.auth.tracesdk.a.a("new Handler() finish!!");
        }

        Looper.loop();
        if(com.baidu.lbsapi.auth.tracesdk.a.a) {
            com.baidu.lbsapi.auth.tracesdk.a.a("LooperThread run() thread id:" + String.valueOf(Thread.currentThread().getId()));
        }

    }

    public void a() {
        if(com.baidu.lbsapi.auth.tracesdk.a.a) {
            com.baidu.lbsapi.auth.tracesdk.a.a("Looper thread quit()");
        }

        this.a.getLooper().quit();
    }

    public void b() {
        Object var1 = this.b;
        synchronized(this.b) {
            try {
                if(!this.c) {
                    this.b.wait();
                }
            } catch (InterruptedException var3) {
                var3.printStackTrace();
            }

        }
    }

    public void c() {
        Object var1 = this.b;
        synchronized(this.b) {
            this.c = true;
            this.b.notifyAll();
        }
    }
}
